     							   <div class="wrap_comment">
                                    <h3 class="comment_title">Leave A Comment [<?php echo $data[num] ?>]</h3>
                                   	<?php if($data[num]>0)
									{
				   						foreach($data[data] as $row)
										{?>
                                         <div class="comment_div">
             	 							<div class="comment_gach">
              									<span class="comment_user<?php echo $row['level'];?>"><?php echo $row['user']; ?></span> says :    
                   								 <span class="comment_time"><?php echo $row['time_add'];?></span>
                                                <div style="clear:both"></div> 
             								</div>
               								<Br/>
        								    <div> <?php echo $row['content'];?></div>
             							        <?php
										if(isset($_SESSION['username']))
										if($_SESSION['username']==$data[user]||$_SESSION['level']==1 || $_SESSION['level']==2)
										{
										?>
                                        	 <div style="text-align:right"> 
        								       <a href="javascript:quote(<?php echo $row['id']?>)" title="Quote This Comment">
                                               <img src="public/images/quote_s1.jpg"  alt="quote this comment" />
                                               </a>
              									<a href="javascript:delete_comment(<?php echo $row['id']?>,<?php echo $_GET['id'];?>)" title="Delete This Comment">
                          						  <img src="<?php echo $baseurl;?>public/images/delete_s1.jpg" alt="delete this comment" /></a>
             								 </div>
                                             <?php
										}
										?>
            						  </div>
           						   <br />
                                     
                               		 <?php
										}
									?>
                                                      
                                    </div><!-- end #main-comment-content -->
                                    <?php
									} //-- $num > 0 , there some comment
										?>
   	<script>
    // O2k7 skin (silver)
	tinyMCE.init({
		// General options
		mode : "exact",
		elements : "comment_content",
		height:150,
		width:550,
		theme : "advanced",
		skin : "o2k7",
		skin_variant : "silver",
		plugins : "advlink,emotions,preview,media,fullscreen,rj_insertcode,embed",
		// Theme options
		theme_advanced_buttons1 : "bold,italic,underline|,justifyleft,justifycenter,justifyright,justifyfull,bullist,numlist,link,unlink",
		theme_advanced_buttons2 :"",
		theme_advanced_buttons3 :"",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : true,
		extended_valid_elements : "a[href|rel|rev|target|title|type]",
		invalid_elements : "script,marquee,iframe,object,p" ,
	   theme_advanced_resizing :false,
    	relative_urls : false, // Default value
		remove_script_host : false,

		// Example content CSS (should be your site CSS)
		content_css : "http://localhost/project/public/exts/tinymce/content.css"

	})

</script>

                                    <div class="comment_form">
                                    	<?php
                                        	if(!isset($_SESSION['username'])){
												?>
                                                <div style="text-align:center; font-weight:bold">Please Login To Post Comment</div>
                                                <?php
											}
											else{
																		
										?>
                                    	
                                         	<?php if(!isset($_SESSION['username']))
											{
												?>
                                            <label>Your Name</label><input type="text" id="comment_user" value="" /><br />
                                            <?php
											}
											else
											{
											?>
                                            <input type="hidden" id="comment_user" value="<?php echo $_SESSION['username']?>" />
                                            <?php
											}?>
                                           <input type="hidden" id="comment_geturl" value="<?php echo $data[geturl]?>" />
                                           <?php
										   if($_GET['module']=='chap')
										   {
											   ?>
                                            <textarea name="comment_content" id="comment_content" style="width:700px"></textarea>
										   <?php
                                           }
										   else
										   {
											   ?>
                                                 <textarea name="comment_content" id="comment_content"></textarea>
                                               <?php
										   }
										   ?>
											<input type="hidden" id="comment_tieude" value="<?php echo htmlspecialchars($data[tieude],ENT_QUOTES,'UTF-8');?>" />
                                             <input type="hidden" id="comment_url" value="<?php echo url();?>" />
         									  <input type="hidden" id="comment_id" value="<?php echo $_GET['id'];?>" />
                                             <label>&nbsp;</label><input id="submit" type="button" name="ok" value="Send" onclick="add_comment()" />
                                             <?php
											} //----- Show comment
											?>
                                        
                                    </div><!-- end #compose-comment -->
                                </div><!-- end wrap comments -->
                                
</div>                                